﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows.Forms;

namespace BmtQuery
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            Control.CheckForIllegalCrossThreadCalls = false;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            //Thread thread = new Thread(() =>
            //{
               
            //});

            //thread.IsBackground = true;
            //thread.Start();


            DelegateSynService.DelegateSynchronizationClient synClient = new DelegateSynService.DelegateSynchronizationClient();
            DataTable data = synClient.QueryTable(textBox1.Text.Trim(), 30000);
            GV.DataSource = data;
          
        }

        private void button2_Click(object sender, EventArgs e)
        {
            DelegateSynService.DelegateSynchronizationClient synClient = new DelegateSynService.DelegateSynchronizationClient();
            synClient.ExecuteSql(textBox1.Text.Trim());
        }
    }
}
